package com.goldsprite.gameframeworks.ecs;

import com.goldsprite.gameframeworks.ecs.component.SpriteComponent;
import com.goldsprite.gameframeworks.ecs.component.TransformComponent;
import com.goldsprite.gameframeworks.ecs.entity.GObject;
import com.goldsprite.gameframeworks.ecs.system.GameSystem;
import com.goldsprite.gameframeworks.ecs.system.RenderLayerManager;

// SystemTest.java - 测试新系统
public class SystemTest {

	public static void main(String[] args) {
		// 初始化游戏系统
		GameSystem gameSystem = new GameSystem();

		// 创建测试实体
		GObject player = new GObject().setTransform().setName("Player");
		player.addComponent(new SpriteComponent());

		// 设置精灵层
		SpriteComponent sprite = player.getComponent(SpriteComponent.class);
		sprite.setSpriteLayer("Entity");

		// 调试信息
		ComponentManager.debugInfo();
		LayerMask.debugLayers();
		RenderLayerManager.debugLayers();
		gameSystem.debugSystems();

		// 模拟游戏循环
		for (int i = 0; i < 10; i++) {
			gameSystem.gameLoop(0.016f); // 60fps
		}
	}
}
